let name = 'window';
// 箭头函数的this在出生时就固定了，永远为它上一层的this
let obj1 = {
  name: 'obj1',
  getName: () => {
    console.log(this); // window
    console.log(this.name); // undefined
  }
};
obj1.getName();

let obj2 = {
  name: 'obj2',
  getName: obj1.getName
};
obj2.getName();